/**
 * 
 */
package test;

import java.util.ArrayList;

import optimization.OptimizationI;
import optimization.naturalOptimization.evolutionaryAlgorithm.evolutionStrategy.MuCommaLambdaCMAES;
import export.ConsoleExport;

/**
 * This class provides a test method for the cma-es.
 * @author Kevin Wagner
 * @version 1.0
 */
public class ExampleCMAES {

	/**
	 * @param args
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static void main(String[] args) {
		OptimizationI opt=new MuCommaLambdaCMAES();
		double[][] bounds=new double[((MuCommaLambdaCMAES)opt).getDimensionality()][2];
		for(int i=0;i<bounds.length;i++){
			bounds[i][0]=0.0;
			bounds[i][1]=1.0;
		}
		((MuCommaLambdaCMAES)opt).setBoundaries(bounds);
		System.out.println("Iitialization :"+opt.init());
		System.out.println("Perform :"+opt.perform());
		ConsoleExport.exportResult((ArrayList<double[]>) opt.getResults(), 2);
	}

}
